<template>
	<div class="main">
		<div class="cover_c">
			<div class="cover">
				<img src="https://xxx.oss.com/dxdh/%E8%92%99%E7%89%88%E7%BB%84%201.png" alt=""
					style="width:100%;height:100%">
			</div>
		</div>

		<div class="content">

			<div class="top_title">
				<div>往年当量</div>
				<div class="detail">与考生当年的“全省排名”、“高考分数”、 “超批次控制线分差”等数据相当的往年的量</div>
			</div>
			<!-- <div class="middle">
			    <!-- <div class="blue"></div> -->
			<!-- <div class="subtitle">二、我的"往年当量":<span class="detail">与考生当年的“全省排名”、“高考分数”、 “超批次控制线分差”等数据相当的往年的量。</span></div> -->
			<!-- <div class="detail"></div>
			</div> -->
			-->

			<titles></titles>
			<!-- <div class="explain" style="display:flex">
                根据您的高考数据，本系统为您计算出"往年当量"
                <div style="float:right;color:rgba(51, 170, 255, 1);cursor:pointer;display:flex;margin-left:15px" @click="open">
                    详细
                    <div style="float" >
                        <i class="el-icon-arrow-down" v-if="!expanded"></i>
                        
                    </div>
                    <div style="float" >
                        <i class="el-icon-arrow-up" v-if="expanded"></i>
                    </div>
                </div>
            </div>
            <div class="detail" v-if="!expanded">本系统通过内部的正运算数学模型运算，  与考生当年的“全省排名”、“高考分数”、 “超批次控制线分差”等数据相当的往年的量。”</div> -->
			<div class="table">
				<table border="1">
					<thead>
						<tr>
							<th>我的数据</th>
							<th>全省排名</th>
							<th>分数</th>
							<th>分差</th>
							<th>年份</th>
						</tr>
					</thead>
					<tbody>
						<tr id="second">
							<td>我的高考数据</td>
							<td>{{myData.rank}}</td>
							<td>{{myData.score}}</td>
							<td>{{myData.scoreDifference}}</td>
							<td>{{myData.year}}</td>
						</tr>
						<tr id="third">
							<td>我的"往年当量"</td>
							<td>{{lastData.ranking}}</td>
							<td>{{lastData.score}}</td>
							<td>{{lastData.pointsDifference}}</td>
							<td>{{lastData.year}}</td>
						</tr>
					</tbody>
				</table>
			</div>
			<!-- <basic-voluntary v-if="display" :equivalent="lastData"></basic-voluntary> -->
			<!-- <div class="select">
                    <el-button class="left" @click="jumpTo('/voluntarymenu')">返回智能填报</el-button>
                    <el-button class="right" type="primary" @click="jumpTo('/basicvoluntary')">下一步</el-button>
            </div> -->
			<div class="leftside">
				<div class="cndns-right-btn">
					<el-link @click="jumpTo('/informationfilling')" :underline="false">
						<i class="el-icon-s-home"></i>
						<div class="text">首页</div>
					</el-link>
				</div>
				<div class="cndns-right-btn">
					<!-- <el-tooltip class="item" effect="light" content="进入往年当量" hide-after="5000" placement="left-start"> -->
					<el-link @click="jumpTo('/informationfilling')" :underline="false">
						<i class="iconfont icon-shangyiye"></i>
						<div class="text">基本信息</div>
					</el-link>
					<!-- </el-tooltip> -->
				</div>
				<div class="cndns-right-btn">
					<!-- <el-tooltip class="item" effect="light" content="进入往年当量" hide-after="5000" placement="left-start"> -->
					<el-link @click="jumpTo('/BasicVoluntary')" :underline="false">
						<i class="iconfont icon-xiayiye"></i>
						<div class="text">基准志愿</div>
					</el-link>
					<!-- </el-tooltip> -->
				</div>
			</div>
			<!-- <div class="select">
				<el-button class="left" @click="jumpTo('/informationfilling')">返回“基本信息”</el-button>
				<el-button class="right" type="primary" @click="jumpTo('/BasicVoluntary')">进入“基准志愿”</el-button>
			</div> -->
		</div>
	</div>
</template>

<script>
	import titles from '../components/Title.vue'
	export default {
		components: {
			titles,
		},
		data() {
			return {
				display: false,
				// subtitle:'二、我的"往年当量"',
				ifhide: 'false', //进入这个页面不需要标题，给子组件传个值
				myData: {},
				status: true,
				lastData: {
					score: 640,
					year: 2019,
					pointsDifference: 99,
					ranking: 12345
				},
				activeNames: ['1'],
				expanded: false, //折叠面板是否展开 
			}
		},
		methods: {
			jumpTo(router) {
				this.$router.push(router)
			},
			//获取分数相当量
			async getEquivalent() {
				let username = JSON.parse(sessionStorage.username)
				await this.$axios.post(`${this.baseURL}/equivalent/myEquivalent?username=${username}`).then(res => {
					this.lastData = res.data.data
					sessionStorage.setItem('equivalent', JSON.stringify(res.data.data))
				})
			},
			//点击详情 切换图标
			open() {
				this.expanded = !this.expanded;
				console.log(this.expanded)
			}
		},
		async mounted() {
			this.myData = JSON.parse(sessionStorage.form) //“我的”高考数据
			await this.getEquivalent()
			this.display = true
		}
	}
</script>

<style scoped>
	.middle {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		/* margin-top: 50px; */
		/* margin-bottom: 47px; */
	}

	.top_title {
		width: 100%;
		height: 140px;
		font-size: 40px;
		position: absolute;
		font-family: Noto Sans SC;
		margin-bottom: 0%;
		/* line-height: 71px; */
		color: #000000;
		/* margin: 0 auto; */
		font-weight: 700;
		/* margin-top: 80px; */
		letter-spacing: 2px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

	}

	.blue {
		width: 8px;
		height: 40px;
		background: #33AAFF;
		margin-left: 88px;
	}

	.subtitle {
		/* width: 256px; */
		/* height: 32px; */
		font-size: 32px;
		font-family: Noto Sans SC;
		font-weight: 500;
		line-height: 43px;
		color: #000000;
		margin-left: 10px;
		letter-spacing: 1px;
	}

	.content {
		width: 1440px;
		min-height: 850px;
		background-color: #fff;
		margin: 100px auto;
		/* position: relative; */
		margin-bottom: 24px;
		z-index: 2;
		position: relative;
	}

	.explain {
		font-size: 22px;
		font-family: Source Han Sans;
		font-weight: 400;
		line-height: 41px;
		color: rgba(0, 0, 0, 0.45);
		width: 600px;
		height: 41px;
		margin-left: 104px;
		margin-top: 24px;
		text-align: left;
	}

	.table {
		width: 1135px;
		height: 195px;
		margin-left: 108px;
		margin-top: 0.15rem;
		position: relative;
	}

	table {
		border-collapse: collapse;
		width: 100%;
		border: 1px solid rgba(51, 170, 255, 1) !important;
	}

	th,
	td {
		height: 65px;
		text-align: left;
		font-size: 30px;
		font-family: Source Han Sans;
		font-weight: 400;
		line-height: 51px;
		color: #3A3A3A;
		background-color: rgba(198, 231, 255, 1);
		padding-left: 20px;
		border: 1px solid rgba(51, 170, 255, 1) !important;
	}

	#second td {
		background-color: #fff;
	}

	#third td {
		color: rgba(255, 51, 51, 1);
	}

	.select {
		width: 750px;
		/* margin-top:60px; */
		/* margin-bottom: 70px; */
		/* height: 150px; */
		left: 0;
		right: 0;
		bottom: 0;
		position: fixed;
		margin: auto;
	}

	.select .left {
		width: 347px;
		height: 62px;
		color: rgba(51, 170, 255, 1);
		float: left;
		font-size: 24px;
		font-family: Source Han Sans;
		font-weight: 100;
		line-height: 41px;
		border: 2px solid #33AAFF;
		border-radius: 10px;
	}

	.select .right {
		width: 347px;
		height: 62px;
		float: right;
		font-size: 24px;
		font-family: Source Han Sans;
		font-weight: 100;
		line-height: 41px;
		border-radius: 10px;
	}

	.cover {
		position: absolute;
		top: -210px;
		z-index: 0;
		/* width: 1900px; */
		height: 276px;
		/* text-align: center; */
		left: 50%;
		margin-left: -960px;
		overflow: hidden;
	}

	.cover_c {
		position: relative;
		width: 100%;
	}

	.detail {
		margin-top: 20px;
		font-size: 22px;
		/* margin: 0.0625rem auto; */
		/* margin-left: 0.541667rem; */
		width: 5.9114rem;
		/* text-align: left; */
		/* margin-top: 0.0625rem; */
		color: #aaabab;
	}

	.leftside {
		position: fixed;
		right: 5%;
		width: 85px;
		min-height: 48px;
		height: 300px;
		top: 50%;
		z-index: 100;
		box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
		border-radius: 40px;
		/* border: 10px solid black; */
		box-sizing: border-box;
		background: #fff;

	}

	.cndns-right-btn {
		border-radius: 40px;
		width: 100%;
		height: 30%;
		/* text-align: center; */
		display: block;
		margin-top: 10px;

		background-color: #fff;
	}

	i {
		font-size: 28px;
	}

	.text {
		font-size: 20px;
		font-family: Source Han Sans;
		font-weight: bold;
	}
</style>
